<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>margin负值运用</title>
    <style>
        ul li {
            /* 浮动，让他们变成一行 */
            float: left;
            list-style: none;
            width: 100px;
            height: 100px;
            border: 1px solid red;
            margin-left: -1px;
            position: relative;



        }

        li:hover {
            z-index: 1;
            border: 1px solid royalblue;

        }
    </style>

</head>

<body>

    <ul>
        <li>1</li>
        <li>1</li>
        <li>1</li>
        <li>1</li>
        <li>1</li>
        <li>2</li>
    </ul>


</body>

</html>